package com.hanggold;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;

public class DemoOne {

    public static void main(String[] args) {

//        Supplier<Long> supplier =getLong();
//
//
//        System.out.println( supplier.get());

        Map<String,String> map = new HashMap<String,String>(){{
           put("namne","tom");
        }};


        AtomicReference<String> result = new AtomicReference<>("");

        map.forEach((k,v)->{
            result.set(k + "=" + v);
        });


        System.out.println(result.get());


    }

    public static Supplier<Long> getLong(){
        return System::currentTimeMillis;
    }



}
